<template>
  <div>
    <el-select v-model="myValue" multiple placeholder="请选择" style="width: 100%">
      <el-option
          v-for="item in option"
          :key="item.value"
          :label="item.label"
          :value="item.value">
      </el-option>
    </el-select>
  </div>
</template>

<script>
export default {
  name: "selectString",
  props: {
    value: {
      type: String,
      default: ''
    },
    option: {
      type: Array,
      default: () => []
    }
  },
  data() {
    return {}
  },
  computed: {
    myValue: {
      get() {
        return this.value.split(',')
      },
      set(v) {
        this.$emit('input', v.toString())
      }
    }
  }
}
</script>

<style scoped>

</style>